import Vuex from 'vuex';
import Vue from 'vue';
import * as userApi from '@/api/user';

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        userInfo: {},
    },
    mutations: {
        SET_USER_INFO(state, newValue) {
            state.userInfo = newValue
        }
    },
    actions: {
        async updateUserInfo(context) {
            const res = await userApi.getUserInfo()
            console.log(res);
            
        },
    }
});
